<?php
include 'database.php'; //数据库的配置信息
require 'lianjie.php';  // 数据库的操作函数
$con = lianjieshujuku($servername, $name, $passwd);//连接数据库
$mac = $_GET['mac'];
if (!mysqli_select_db($con, 'flower')) {
    die("选择数据库失败");
}
$req = mysqli_query($con, "select `atname` from `fname` WHERE `mac`= '$mac'");
$m = mysqli_fetch_array($req);
echo $m['atname'];

//$arry = explode('|', $m['atname']);
//
//$i=0;
//$f = array();
//foreach ($arry as $flower_name){
//
//    $f["$i"."flower"] = $flower_name;
//    $i++;
//}
//
//echo json_encode($f);
